package com.rabbitmq.delayplugin.controller;

import com.rabbitmq.delayplugin.producer.RabbitMQDelayPluginProducer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.time.LocalDateTime;

@RestController
@Slf4j
public class DelayPluginController {
    @Resource
    RabbitMQDelayPluginProducer rabbitMQDelayPluginProducer;

    @RequestMapping("delayPlugin")
    public void send(String message,int delay){
        rabbitMQDelayPluginProducer.send(message,delay);
    }
}
